/**
 */
package gatperdut.chato.model.Chato.Item.impl;

import gatperdut.chato.model.Chato.ChatoPackage;
import gatperdut.chato.model.Chato.Constant.ConstantPackage;
import gatperdut.chato.model.Chato.Constant.impl.ConstantPackageImpl;
import gatperdut.chato.model.Chato.Container.ContainerPackage;
import gatperdut.chato.model.Chato.Container.impl.ContainerPackageImpl;
import gatperdut.chato.model.Chato.Craft.CraftPackage;
import gatperdut.chato.model.Chato.Craft.impl.CraftPackageImpl;
import gatperdut.chato.model.Chato.Entity.EntityPackage;
import gatperdut.chato.model.Chato.Entity.Skill.SkillPackage;
import gatperdut.chato.model.Chato.Entity.Skill.impl.SkillPackageImpl;
import gatperdut.chato.model.Chato.Entity.impl.EntityPackageImpl;
import gatperdut.chato.model.Chato.Item.Amount;
import gatperdut.chato.model.Chato.Item.BoxInventory;
import gatperdut.chato.model.Chato.Item.Drink;
import gatperdut.chato.model.Chato.Item.EntityInventory;
import gatperdut.chato.model.Chato.Item.EntityInventorySlot;
import gatperdut.chato.model.Chato.Item.Food;
import gatperdut.chato.model.Chato.Item.GenericBoxInventory;
import gatperdut.chato.model.Chato.Item.GenericInventory;
import gatperdut.chato.model.Chato.Item.GenericItem;
import gatperdut.chato.model.Chato.Item.Item;
import gatperdut.chato.model.Chato.Item.ItemFactory;
import gatperdut.chato.model.Chato.Item.ItemPackage;
import gatperdut.chato.model.Chato.Item.ItemTemplate;
import gatperdut.chato.model.Chato.Item.Stack;
import gatperdut.chato.model.Chato.Item.TemplateBoxInventory;
import gatperdut.chato.model.Chato.Item.Wear;
import gatperdut.chato.model.Chato.Player.PlayerPackage;
import gatperdut.chato.model.Chato.Player.impl.PlayerPackageImpl;
import gatperdut.chato.model.Chato.Room.RoomPackage;
import gatperdut.chato.model.Chato.Room.impl.RoomPackageImpl;
import gatperdut.chato.model.Chato.Util.UtilPackage;
import gatperdut.chato.model.Chato.Util.impl.UtilPackageImpl;
import gatperdut.chato.model.Chato.impl.ChatoPackageImpl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class ItemPackageImpl extends EPackageImpl implements ItemPackage {
	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass itemEClass = null;

	/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EClass genericItemEClass = null;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EClass genericInventoryEClass = null;

    /**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass itemTemplateEClass = null;

	/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EClass boxInventoryEClass = null;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EClass templateBoxInventoryEClass = null;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EClass genericBoxInventoryEClass = null;

    /**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass stackEClass = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass foodEClass = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass drinkEClass = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass amountEClass = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass entityInventoryEClass = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass entityInventorySlotEClass = null;

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private EClass wearEClass = null;

	/**
     * Creates an instance of the model <b>Package</b>, registered with
     * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
     * package URI value.
     * <p>Note: the correct way to create the package is via the static
     * factory method {@link #init init()}, which also performs
     * initialization of the package, or returns the registered package,
     * if one already exists.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see org.eclipse.emf.ecore.EPackage.Registry
     * @see gatperdut.chato.model.Chato.Item.ItemPackage#eNS_URI
     * @see #init()
     * @generated
     */
	private ItemPackageImpl() {
        super(eNS_URI, ItemFactory.eINSTANCE);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private static boolean isInited = false;

	/**
     * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
     * 
     * <p>This method is used to initialize {@link ItemPackage#eINSTANCE} when that field is accessed.
     * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @see #eNS_URI
     * @see #createPackageContents()
     * @see #initializePackageContents()
     * @generated
     */
	public static ItemPackage init() {
        if (isInited) return (ItemPackage)EPackage.Registry.INSTANCE.getEPackage(ItemPackage.eNS_URI);

        // Obtain or create and register package
        ItemPackageImpl theItemPackage = (ItemPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ItemPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ItemPackageImpl());

        isInited = true;

        // Obtain or create and register interdependencies
        ChatoPackageImpl theChatoPackage = (ChatoPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ChatoPackage.eNS_URI) instanceof ChatoPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ChatoPackage.eNS_URI) : ChatoPackage.eINSTANCE);
        PlayerPackageImpl thePlayerPackage = (PlayerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(PlayerPackage.eNS_URI) instanceof PlayerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PlayerPackage.eNS_URI) : PlayerPackage.eINSTANCE);
        EntityPackageImpl theEntityPackage = (EntityPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI) instanceof EntityPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(EntityPackage.eNS_URI) : EntityPackage.eINSTANCE);
        SkillPackageImpl theSkillPackage = (SkillPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SkillPackage.eNS_URI) instanceof SkillPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SkillPackage.eNS_URI) : SkillPackage.eINSTANCE);
        RoomPackageImpl theRoomPackage = (RoomPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(RoomPackage.eNS_URI) instanceof RoomPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(RoomPackage.eNS_URI) : RoomPackage.eINSTANCE);
        ConstantPackageImpl theConstantPackage = (ConstantPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ConstantPackage.eNS_URI) instanceof ConstantPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ConstantPackage.eNS_URI) : ConstantPackage.eINSTANCE);
        ContainerPackageImpl theContainerPackage = (ContainerPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(ContainerPackage.eNS_URI) instanceof ContainerPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(ContainerPackage.eNS_URI) : ContainerPackage.eINSTANCE);
        CraftPackageImpl theCraftPackage = (CraftPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI) instanceof CraftPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CraftPackage.eNS_URI) : CraftPackage.eINSTANCE);
        UtilPackageImpl theUtilPackage = (UtilPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI) instanceof UtilPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI) : UtilPackage.eINSTANCE);

        // Create package meta-data objects
        theItemPackage.createPackageContents();
        theChatoPackage.createPackageContents();
        thePlayerPackage.createPackageContents();
        theEntityPackage.createPackageContents();
        theSkillPackage.createPackageContents();
        theRoomPackage.createPackageContents();
        theConstantPackage.createPackageContents();
        theContainerPackage.createPackageContents();
        theCraftPackage.createPackageContents();
        theUtilPackage.createPackageContents();

        // Initialize created meta-data
        theItemPackage.initializePackageContents();
        theChatoPackage.initializePackageContents();
        thePlayerPackage.initializePackageContents();
        theEntityPackage.initializePackageContents();
        theSkillPackage.initializePackageContents();
        theRoomPackage.initializePackageContents();
        theConstantPackage.initializePackageContents();
        theContainerPackage.initializePackageContents();
        theCraftPackage.initializePackageContents();
        theUtilPackage.initializePackageContents();

        // Mark meta-data to indicate it can't be changed
        theItemPackage.freeze();

  
        // Update the registry and return the package
        EPackage.Registry.INSTANCE.put(ItemPackage.eNS_URI, theItemPackage);
        return theItemPackage;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getItem() {
        return itemEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getItem_Template() {
        return (EReference)itemEClass.getEStructuralFeatures().get(0);
    }

	/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getItem_Inventory() {
        return (EReference)itemEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EClass getGenericItem() {
        return genericItemEClass;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getGenericItem_ShortDesc() {
        return (EAttribute)genericItemEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getGenericItem_LongDesc() {
        return (EAttribute)genericItemEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getGenericItem_FullDesc() {
        return (EAttribute)genericItemEClass.getEStructuralFeatures().get(2);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getGenericItem_Keywords() {
        return (EAttribute)genericItemEClass.getEStructuralFeatures().get(3);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getGenericItem_Stack() {
        return (EReference)genericItemEClass.getEStructuralFeatures().get(4);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getGenericItem_Food() {
        return (EReference)genericItemEClass.getEStructuralFeatures().get(5);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getGenericItem_Drink() {
        return (EReference)genericItemEClass.getEStructuralFeatures().get(6);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getGenericItem_W() {
        return (EAttribute)genericItemEClass.getEStructuralFeatures().get(7);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getGenericItem_Wear() {
        return (EReference)genericItemEClass.getEStructuralFeatures().get(8);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EClass getGenericInventory() {
        return genericInventoryEClass;
    }

    /**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getItemTemplate() {
        return itemTemplateEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getItemTemplate_Inventory() {
        return (EReference)itemTemplateEClass.getEStructuralFeatures().get(0);
    }

	/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EClass getBoxInventory() {
        return boxInventoryEClass;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getBoxInventory_Items() {
        return (EReference)boxInventoryEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EClass getTemplateBoxInventory() {
        return templateBoxInventoryEClass;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getTemplateBoxInventory_Items() {
        return (EReference)templateBoxInventoryEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EClass getGenericBoxInventory() {
        return genericBoxInventoryEClass;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getGenericBoxInventory_Open() {
        return (EAttribute)genericBoxInventoryEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getGenericBoxInventory_Closable() {
        return (EAttribute)genericBoxInventoryEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getGenericBoxInventory_Lock() {
        return (EReference)genericBoxInventoryEClass.getEStructuralFeatures().get(2);
    }

    /**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getStack() {
        return stackEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getFood() {
        return foodEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getFood_Portion() {
        return (EAttribute)foodEClass.getEStructuralFeatures().get(0);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getFood_MaxPortion() {
        return (EAttribute)foodEClass.getEStructuralFeatures().get(1);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getDrink() {
        return drinkEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getDrink_FluidContent() {
        return (EAttribute)drinkEClass.getEStructuralFeatures().get(0);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getAmount() {
        return amountEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getAmount_Current() {
        return (EAttribute)amountEClass.getEStructuralFeatures().get(0);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getAmount_Max() {
        return (EAttribute)amountEClass.getEStructuralFeatures().get(1);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getEntityInventory() {
        return entityInventoryEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getEntityInventory_Slots() {
        return (EReference)entityInventoryEClass.getEStructuralFeatures().get(0);
    }

	/**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EReference getEntityInventory_Items() {
        return (EReference)entityInventoryEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getEntityInventorySlot() {
        return entityInventorySlotEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getEntityInventorySlot_WearLoc() {
        return (EAttribute)entityInventorySlotEClass.getEStructuralFeatures().get(0);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EReference getEntityInventorySlot_Item() {
        return (EReference)entityInventorySlotEClass.getEStructuralFeatures().get(1);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EClass getWear() {
        return wearEClass;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public EAttribute getWear_WearLocs() {
        return (EAttribute)wearEClass.getEStructuralFeatures().get(0);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public ItemFactory getItemFactory() {
        return (ItemFactory)getEFactoryInstance();
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private boolean isCreated = false;

	/**
     * Creates the meta-model objects for the package.  This method is
     * guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void createPackageContents() {
        if (isCreated) return;
        isCreated = true;

        // Create classes and their features
        itemEClass = createEClass(ITEM);
        createEReference(itemEClass, ITEM__TEMPLATE);
        createEReference(itemEClass, ITEM__INVENTORY);

        genericItemEClass = createEClass(GENERIC_ITEM);
        createEAttribute(genericItemEClass, GENERIC_ITEM__SHORT_DESC);
        createEAttribute(genericItemEClass, GENERIC_ITEM__LONG_DESC);
        createEAttribute(genericItemEClass, GENERIC_ITEM__FULL_DESC);
        createEAttribute(genericItemEClass, GENERIC_ITEM__KEYWORDS);
        createEReference(genericItemEClass, GENERIC_ITEM__STACK);
        createEReference(genericItemEClass, GENERIC_ITEM__FOOD);
        createEReference(genericItemEClass, GENERIC_ITEM__DRINK);
        createEAttribute(genericItemEClass, GENERIC_ITEM__W);
        createEReference(genericItemEClass, GENERIC_ITEM__WEAR);

        genericInventoryEClass = createEClass(GENERIC_INVENTORY);

        stackEClass = createEClass(STACK);

        foodEClass = createEClass(FOOD);
        createEAttribute(foodEClass, FOOD__PORTION);
        createEAttribute(foodEClass, FOOD__MAX_PORTION);

        drinkEClass = createEClass(DRINK);
        createEAttribute(drinkEClass, DRINK__FLUID_CONTENT);

        amountEClass = createEClass(AMOUNT);
        createEAttribute(amountEClass, AMOUNT__CURRENT);
        createEAttribute(amountEClass, AMOUNT__MAX);

        entityInventoryEClass = createEClass(ENTITY_INVENTORY);
        createEReference(entityInventoryEClass, ENTITY_INVENTORY__SLOTS);
        createEReference(entityInventoryEClass, ENTITY_INVENTORY__ITEMS);

        entityInventorySlotEClass = createEClass(ENTITY_INVENTORY_SLOT);
        createEAttribute(entityInventorySlotEClass, ENTITY_INVENTORY_SLOT__WEAR_LOC);
        createEReference(entityInventorySlotEClass, ENTITY_INVENTORY_SLOT__ITEM);

        wearEClass = createEClass(WEAR);
        createEAttribute(wearEClass, WEAR__WEAR_LOCS);

        itemTemplateEClass = createEClass(ITEM_TEMPLATE);
        createEReference(itemTemplateEClass, ITEM_TEMPLATE__INVENTORY);

        boxInventoryEClass = createEClass(BOX_INVENTORY);
        createEReference(boxInventoryEClass, BOX_INVENTORY__ITEMS);

        templateBoxInventoryEClass = createEClass(TEMPLATE_BOX_INVENTORY);
        createEReference(templateBoxInventoryEClass, TEMPLATE_BOX_INVENTORY__ITEMS);

        genericBoxInventoryEClass = createEClass(GENERIC_BOX_INVENTORY);
        createEAttribute(genericBoxInventoryEClass, GENERIC_BOX_INVENTORY__OPEN);
        createEAttribute(genericBoxInventoryEClass, GENERIC_BOX_INVENTORY__CLOSABLE);
        createEReference(genericBoxInventoryEClass, GENERIC_BOX_INVENTORY__LOCK);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	private boolean isInitialized = false;

	/**
     * Complete the initialization of the package and its meta-model.  This
     * method is guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void initializePackageContents() {
        if (isInitialized) return;
        isInitialized = true;

        // Initialize package
        setName(eNAME);
        setNsPrefix(eNS_PREFIX);
        setNsURI(eNS_URI);

        // Obtain other dependent packages
        ConstantPackage theConstantPackage = (ConstantPackage)EPackage.Registry.INSTANCE.getEPackage(ConstantPackage.eNS_URI);
        UtilPackage theUtilPackage = (UtilPackage)EPackage.Registry.INSTANCE.getEPackage(UtilPackage.eNS_URI);

        // Create type parameters

        // Set bounds for type parameters

        // Add supertypes to classes
        itemEClass.getESuperTypes().add(this.getGenericItem());
        stackEClass.getESuperTypes().add(this.getAmount());
        foodEClass.getESuperTypes().add(this.getAmount());
        drinkEClass.getESuperTypes().add(this.getFood());
        entityInventoryEClass.getESuperTypes().add(this.getGenericInventory());
        itemTemplateEClass.getESuperTypes().add(this.getGenericItem());
        boxInventoryEClass.getESuperTypes().add(this.getGenericBoxInventory());
        templateBoxInventoryEClass.getESuperTypes().add(this.getGenericBoxInventory());
        genericBoxInventoryEClass.getESuperTypes().add(this.getGenericInventory());

        // Initialize classes, features, and operations; add parameters
        initEClass(itemEClass, Item.class, "Item", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEReference(getItem_Template(), this.getItemTemplate(), null, "template", null, 1, 1, Item.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getItem_Inventory(), this.getBoxInventory(), null, "inventory", null, 0, 1, Item.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);

        initEClass(genericItemEClass, GenericItem.class, "GenericItem", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getGenericItem_ShortDesc(), ecorePackage.getEString(), "shortDesc", null, 1, 1, GenericItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getGenericItem_LongDesc(), ecorePackage.getEString(), "longDesc", null, 1, 1, GenericItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getGenericItem_FullDesc(), ecorePackage.getEString(), "fullDesc", null, 1, 1, GenericItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getGenericItem_Keywords(), ecorePackage.getEString(), "keywords", null, 1, -1, GenericItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getGenericItem_Stack(), this.getStack(), null, "stack", null, 0, 1, GenericItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getGenericItem_Food(), this.getFood(), null, "food", null, 0, 1, GenericItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getGenericItem_Drink(), this.getDrink(), null, "drink", null, 0, 1, GenericItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getGenericItem_W(), ecorePackage.getEInt(), "w", null, 1, 1, GenericItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getGenericItem_Wear(), this.getWear(), null, "wear", null, 0, 1, GenericItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(genericInventoryEClass, GenericInventory.class, "GenericInventory", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

        initEClass(stackEClass, Stack.class, "Stack", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

        initEClass(foodEClass, Food.class, "Food", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getFood_Portion(), ecorePackage.getEInt(), "portion", null, 1, 1, Food.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getFood_MaxPortion(), ecorePackage.getEInt(), "maxPortion", null, 1, 1, Food.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(drinkEClass, Drink.class, "Drink", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getDrink_FluidContent(), theConstantPackage.getFluid(), "fluidContent", null, 1, 1, Drink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(amountEClass, Amount.class, "Amount", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getAmount_Current(), ecorePackage.getEInt(), "current", null, 1, 1, Amount.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getAmount_Max(), ecorePackage.getEInt(), "max", null, 1, 1, Amount.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(entityInventoryEClass, EntityInventory.class, "EntityInventory", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEReference(getEntityInventory_Slots(), this.getEntityInventorySlot(), null, "slots", null, 0, -1, EntityInventory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getEntityInventory_Items(), this.getItem(), null, "items", null, 0, -1, EntityInventory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);

        initEClass(entityInventorySlotEClass, EntityInventorySlot.class, "EntityInventorySlot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getEntityInventorySlot_WearLoc(), theConstantPackage.getWearLoc(), "wearLoc", null, 1, 1, EntityInventorySlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getEntityInventorySlot_Item(), this.getItem(), null, "item", null, 0, 1, EntityInventorySlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(wearEClass, Wear.class, "Wear", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getWear_WearLocs(), theConstantPackage.getWearLoc(), "wearLocs", null, 1, -1, Wear.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(itemTemplateEClass, ItemTemplate.class, "ItemTemplate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEReference(getItemTemplate_Inventory(), this.getTemplateBoxInventory(), null, "inventory", null, 0, 1, ItemTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);

        initEClass(boxInventoryEClass, BoxInventory.class, "BoxInventory", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEReference(getBoxInventory_Items(), this.getItem(), null, "items", null, 0, -1, BoxInventory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);

        initEClass(templateBoxInventoryEClass, TemplateBoxInventory.class, "TemplateBoxInventory", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEReference(getTemplateBoxInventory_Items(), this.getItemTemplate(), null, "items", null, 0, -1, TemplateBoxInventory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);

        initEClass(genericBoxInventoryEClass, GenericBoxInventory.class, "GenericBoxInventory", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getGenericBoxInventory_Open(), ecorePackage.getEBoolean(), "open", "true", 1, 1, GenericBoxInventory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getGenericBoxInventory_Closable(), ecorePackage.getEBoolean(), "closable", "false", 1, 1, GenericBoxInventory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getGenericBoxInventory_Lock(), theUtilPackage.getLock(), null, "lock", null, 0, 1, GenericBoxInventory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
    }

} //ItemPackageImpl
